package com.imooc.mapper;

import com.imooc.my.mapper.MyMapper;
import com.imooc.pojo.ItemsComments;
import com.imooc.pojo.vo.ItemCommentVO;
import com.imooc.pojo.vo.SearchItemVO;
import com.imooc.pojo.vo.ShopcartVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface ItemsCommentsMapper extends MyMapper<ItemsComments> {

    List<ItemCommentVO> queryItemComments(@Param("paramsMap") Map<String,Object> paramsMap);

    List<SearchItemVO> searchItems(@Param("paramsMap") Map<String,Object> paramsMap);

    List<SearchItemVO> searchItemsByThirdCat(@Param("paramsMap") Map<String,Object> paramsMap);

    List<ShopcartVO> queryItemsBySpecIds(@Param("paramsList") List specIdsList);

    int decreaseItemSpecStock(@Param("specId") String specId,
                              @Param("pendingCounts")Integer pendingCounts);

}